package com.xuyu.nacos.callback.listener.model;

import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Objects;

/**
 * @author xuyu
 */
@Data
@Accessors(chain = true)
public class NacosConfigListenerProperties {

    private String simpleDataId;

    private String group;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }

        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        NacosConfigListenerProperties that = (NacosConfigListenerProperties) o;
        return simpleDataId.equals(that.simpleDataId) && group.equals(that.group);
    }

    @Override
    public int hashCode() {
        return Objects.hash(simpleDataId, group);
    }
}
